﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/OneColumn.Master" AutoEventWireup="true"
    CodeBehind="Edit.aspx.cs" Inherits="SharingCenter.Web.Mod.Groups.Edit" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    <asp:Literal ID="ltrTitle" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <asp:ScriptManagerProxy runat="server" ID="ScriptManagerProxy1">
        <Scripts>
            <asp:ScriptReference Path="~/Mod/Talks/CreateThread.js" />
        </Scripts>
    </asp:ScriptManagerProxy>
    <myuc:GroupHeader ID="GroupHeader1" runat="server" GroupIdQueryStringField="id" />
    <myuc:GenericTabs ID="LinkListTabs2" runat="server" Section="GroupPage" SelectedItem="2"
        AddPageQueryString="true" PreservedQueryStringFields="id" />
    <asp:FormView ID="FormView1" DataKeyNames="PostId" runat="server" Width="100%" DataSourceID="LinqDataSource1"
        DefaultMode="Edit" CellPadding="0" CellSpacing="0">
        <EditItemTemplate>
            <h2 class="bb">
                <div class="nss ns-edit">
                </div>
                <asp:Label ID="Label1" runat="server" CssClass="iconlabel" Text='<%#Eval("PostTitle", "修改帖子: 【{0}】") %>'></asp:Label></h2>
            <div class="formtable">
                <table cellspacing="0" width="100%">
                    <tr>
                        <td valign="middle">
                            标题:
                        </td>
                        <td>
                            <div>
                                <table class="nop">
                                    <tr>
                                        <%-- <td>
                                            <span class="posticonselect">
                                                <asp:Label ID="LinkButton1" runat="server" CssClass="pointer selecticon">
                                                    <asp:Image ID="imgDefaultIcon" runat="server" />
                                                </asp:Label>
                                            </span>
                                            <asp:Panel ID="pnPostIcons" CssClass="ctn2 bdr-all" BackColor="White" runat="server">
                                                <asp:ListView ID="ListView1" runat="server" GroupItemCount="6">
                                                    <LayoutTemplate>
                                                        <table>
                                                            <tr runat="server" id="groupPlaceholder" />
                                                        </table>
                                                    </LayoutTemplate>
                                                    <ItemTemplate>
                                                        <td>
                                                            <div class="posticon pointer">
                                                                <asp:HiddenField ID="HiddenField1" runat="server" Value='<%#((System.Collections.Generic.KeyValuePair<string, string>)Container.DataItem).Key %>' />
                                                                <asp:Image ID="Image1" ToolTip='<%#((System.Collections.Generic.KeyValuePair<string, string>)Container.DataItem).Value %>'
                                                                    runat="server" ImageUrl='<%#string.Format(SharingCenter.Web.Classes.WebConsts.POST_ICON_DIR+"/{0}" ,((System.Collections.Generic.KeyValuePair<string, string>)Container.DataItem).Key) %>'
                                                                    AlternateText='<%#((System.Collections.Generic.KeyValuePair<string, string>)Container.DataItem).Value %>' />
                                                            </div>
                                                        </td>
                                                    </ItemTemplate>
                                                    <GroupTemplate>
                                                        <tr>
                                                            <td runat="server" id="itemPlaceholder" />
                                                        </tr>
                                                    </GroupTemplate>
                                                </asp:ListView>
                                            </asp:Panel>
                                            <ajaxctrltool:PopupControlExtender ID="PopupControlExtender1" runat="server" TargetControlID="LinkButton1"
                                                PopupControlID="pnPostIcons" Position="Bottom" BehaviorID="postIconPopup">
                                            </ajaxctrltool:PopupControlExtender>
                                        </td>--%>
                                        <td>
                                            <asp:TextBox CssClass="sz-m" ID="txtTitle" runat="server" Style="width: 380px" Text='<%#Bind("PostTitle") %>'></asp:TextBox>
                                        </td>
                                        <td>
                                            <%--<asp:RadioButtonList ID="rdoType" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal"
                                             SelectedValue='<%#Bind("PostType") %>'>
                                                <asp:ListItem Text="原创" Value="1"></asp:ListItem>
                                                <asp:ListItem Text="转载" Value="2"></asp:ListItem>
                                            </asp:RadioButtonList>--%>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            内容:
                        </td>
                        <td>
                            <myuc:Editor runat="server" ID="Editor1" Width="100%" Height="400" EditorType="Advanced"
                                Content='<%#Bind("PostContent") %>' />
                        </td>
                    </tr>
                </table>
            </div>
            <div class="actionarea">
                <a rel="posticon">
                    <asp:HiddenField ID="PostIcon" runat="server" />
                </a>
                <asp:LinkButton ID="InsertButton" CommandName="Update" runat="server" CssClass="submitbutton"
                    CausesValidation="True" Text="修改" />
               <a href="./?id=<%=Request.QueryString["id"] %>" class="cancelbutton">取消</a>
            </div>
        </EditItemTemplate>
    </asp:FormView>
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="SharingCenter.Web.Classes.scDataContext"
        EnableDelete="True" EnableUpdate="True" TableName="Sc_Posts" Where="PostId == @PostId">
        <WhereParameters>
            <asp:QueryStringParameter DbType="Guid" Name="PostId" QueryStringField="p" />
        </WhereParameters>
    </asp:LinqDataSource>
</asp:Content>
